import java.io.BufferedReader;
import java.io.PrintStream;
import java.util.List;

public class ListCommand implements MenuCommand {

    private static final String NAME = "Press 1 for List Players";
    private PrintStream printStream;
    private List<Player> players;


    public ListCommand(PrintStream printStream, List<Player> players) {
        this.printStream = printStream;
        this.players = players;
    }



    @Override
    public void act() {
        for(Player player : players) {
        printStream.println(player.toString());
        }
    }

    @Override
    public String toString() {
        return NAME;
    }
}
